package com.huatai.bpmn.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.huatai.bpmn.entity.TbBusinessEntity;
import com.huatai.bpmn.entity.dto.BusinessDto;
import com.huatai.bpmn.entity.dto.CandidateTaskDto;
import com.huatai.bpmn.entity.dto.PageDto;
import com.huatai.bpmn.entity.vo.CompleteTaskVO;
import com.huatai.bpmn.entity.vo.DeploymentVO;
import com.huatai.bpmn.entity.vo.HistoryVO;
import com.huatai.bpmn.entity.vo.TaskVO;
import com.huatai.common.api.R;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * @author 聂贞吉
 * @description 针对表【tb_business】的数据库操作Service
 * @createDate 2023-07-07 15:34:25
 */
public interface TbBusinessService extends IService<TbBusinessEntity> {

	R<Map<String, Object>> findToDoTask(CandidateTaskDto candidateTaskDto);

	R<Boolean> fulfilTask(JSONObject jsonObject);


	R<Map<String, Object>> taskHistoryInfo(CandidateTaskDto candidateTaskDto);

	R<Map<String, Object>> findCompleteTask(CandidateTaskDto candidateTaskDto);


	Object findToDoTaskParticulars(JSONObject jsonObject);

	R<Map<String, Object>> deploy(MultipartFile file, String deployName, String externalParameterId) throws IOException;

	R<Map<String, Object>> getDeployList(PageDto pageDto);


	R<String>  removeFlowInstance(String processInstanceId,String reason);

	R<JSONObject> findDeployFormById(String deploymentId);

    R<Map<String, Object>> findOneselfApplication(CandidateTaskDto candidateTaskDto);

	R<Map<String, Object>> selectCompleteTaskAll(CandidateTaskDto candidateTaskDto);

	void getDeploymentFlowChart(String definitionKey,HttpServletResponse response) throws IOException;


	R getDeploymentId(String processInstanceId);

	JSONObject getNodeData(String processInstanceId);

	R<Map<String, Object>> findOneselfApplicationAndDeployment(CandidateTaskDto candidateTaskDto);

	List<TbBusinessEntity> getBusinessList(BusinessDto businessDto);
}
